load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "colbuilder",
    srcs = [
        "execplan.go",
        "execplan_util.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/colexec/colbuilder",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/col/coldata",
        "//pkg/col/coldataext",
        "//pkg/col/typeconv",
        "//pkg/kv/kvserver/concurrency/lock",
        "//pkg/settings",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/colconv",
        "//pkg/sql/colexec",
        "//pkg/sql/colexec/colexecagg",
        "//pkg/sql/colexec/colexecargs",
        "//pkg/sql/colexec/colexecbase",
        "//pkg/sql/colexec/colexecdisk",
        "//pkg/sql/colexec/colexecjoin",
        "//pkg/sql/colexec/colexecproj",
        "//pkg/sql/colexec/colexecprojconst",
        "//pkg/sql/colexec/colexecsel",
        "//pkg/sql/colexec/colexecutils",
        "//pkg/sql/colexec/colexecwindow",
        "//pkg/sql/colexecerror",
        "//pkg/sql/colexecop",
        "//pkg/sql/colfetcher",
        "//pkg/sql/colmem",
        "//pkg/sql/execinfra",
        "//pkg/sql/execinfra/execagg",
        "//pkg/sql/execinfra/execreleasable",
        "//pkg/sql/execinfrapb",
        "//pkg/sql/row",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sem/tree/treebin",
        "//pkg/sql/sem/tree/treecmp",
        "//pkg/sql/sessiondatapb",
        "//pkg/sql/types",
        "//pkg/util/buildutil",
        "//pkg/util/errorutil/unimplemented",
        "//pkg/util/log",
        "//pkg/util/mon",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
    ],
)

go_test(
    name = "colbuilder_test",
    size = "small",
    srcs = [
        "execplan_test.go",
        "main_test.go",
    ],
    embed = [":colbuilder"],
    deps = [
        "//pkg/base",
        "//pkg/kv",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/desctestutils",
        "//pkg/sql/catalog/fetchpb",
        "//pkg/sql/colexec",
        "//pkg/sql/colexec/colexecargs",
        "//pkg/sql/execinfra",
        "//pkg/sql/execinfrapb",
        "//pkg/sql/randgen",
        "//pkg/sql/rowenc",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "@com_github_stretchr_testify//require",
    ],
)
